package com.ccb.ha.zhxf.service.impl;

import com.ccb.ha.zhxf.entity.User;
import com.ccb.ha.zhxf.mapper.UserMapper;
import com.ccb.ha.zhxf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {

        return userMapper.findAll();
    }
    @Override
    public List<User> findById(int mechanism_id) {

        return userMapper.findById(mechanism_id);
    }

    public int InsertUser(User users){

        return userMapper.InsertUser(users);
    }

    public int updateUser(User users) {
        return userMapper.updateUser(users);
    }
    public int updateUser(Map users) {
        return userMapper.updateUser2(users);
    }
    public int deleteUser(int id) {
        return userMapper.deleteUser(id);
    }
}
